1. Field of the Invention
The present invention relates to a method of processing signals of encoders and an apparatus employing the same by each of which addition or subtraction for a counter is carried out on the basis of output signals from two-phase incremental encoders to obtain absolute angle data.
2. Description of the Related Art
As well known, the chattering or the overshoot occurs in an output signal of an incremental optical encoder which is coupled to a stepping motor.
The chattering is the phenomenon in which the signal level is vibrated transiently in the process having the changing signal, and the occurrence causes thereof are as follows.
(1) The chattering occurs due to the fact that the mechanical vibration of the rotor is detected by the optical encoder.
In the stepping motor, the chattering due to the above-mentioned cause may readily occur in the vicinity of the detention positions.
(2) When the level of an output signal of a sensor becomes equal to or higher than an electrical threshold level, the chattering may readily occur in the output signal of the encoder due to the fluctuation of the level of the output signal of the sensor in the vicinity of the threshold level.
The chattering of this sort may occur due to the electrical noises as well as the mechanical vibration of the rotor as described above.
The overshoot is the phenomenon in which the encoder outputs the unscheduled signal when stopping the rotating motor or changing the rotational direction of the motor. The overshoot of this sort occurs in the case where the angular momentum remaining in the rotor of the motor when the rotor comes to the detention position is relatively larger than the amount of attenuation (the attenuation coefficient) which is obtained when the rotor moves to the position where the next output signal of the optical encoder changes.
In such a case, after having moved to the position where the next output signal of the optical encoder changes, the rotor of the motor intends to move back to the predetermined detent position again. Then, the overshoot is the phenomenon in which the momentum, which is overshot, is detected by the optical encoder.
While the foregoing is associated with the sides of the stepping motor and the optical encoder, in the case of the combination of an actuator with a position detector, in general, the problems associated with both of the chattering and the overshoot arise. On the other hand, when the rotor is moved smoothly, and also the stop ability is excellent, the chattering or the overshoot may not occur at all in some cases.
Incidentally, while the incremental optical encoder is the device wherein by inputting the output signal to the counter, the absolute angle data is produced to detect the position (the angle) of the rotor of the motor, there arises the problem that if the signal containing therein the above-mentioned chattering or overshoot is inputted to the counter, then the error occurs in the count value (the angle data).
As for the course of solving the above-mentioned problem, there is conceivable a course in which the encoder is prevented from outputting the chattering or the overshoot. However, this course invites the unreasonable results.
In actual, when selecting the motor, there may be the case where by taking occurrence of the chattering or the overshoot in output signal of the optical encoder into consideration, the torque which the motor generates is reduced (i.e., in the stepping motor, the local rotational speed becomes slow) or the attenuation coefficient is made large (i.e., the friction is generated) in order that the rotor may not have the too large angular momentum. In a word, this aims at forcedly providing the motor difficulties in moving, and hence there arises the unreasonableness that the measure taken for the output signal of the optical encoder results in the driving performance of the motor being limited.
In other words, since as described above, the mechanical vibration of the rotor of the stepping motor or the like appears in the output signal of the optical encoder so that the phenomena of the chattering or the overshoot occurs. If viewed in terms of the optical encoder itself, then the output signal of the optical encoder reflects faithfully the motion of the rotor and hence is normally operated.
Therefore, taking the measure of preventing the chattering and the overshoot from occurring in the output signal of the optical encoder results in that by increasing the viscosity of grease in the bearing and the harmonic gear or decreasing the torque output of the motor to eliminate the margin between the load torque and the output torque, or otherwise by making slow the electrical response speed of the optical encoder, the method is forced to be adopted wherein the output signal of the encoder is apparently made hardly changed.
Though, essentially, such a method is optionally provided for the purpose of measuring the angle of the rotor of the motor by the optical encoder, this becomes the cause of reducing the driving performance of the motor all the worse, and hence such a method would be preposterous as the means for solving the problem.
In order to radically solve the above-mentioned problem, it is required that on the assumption that the output signal of the optical encoder contains therein the chattering or the overshoot, the signal is processed within the circuit in the process of producing the angle data on the basis of the output signal of the optical encoder, thereby preventing any error from occurring in the final count value (the angle data).
In order to configure the circuit of this sort, it is required that in the optical encoder, the slits of two columns or more are formed therein in order to output the signals of two phases or more. If the phase of the output signal of the encoder is only one, when the chattering or the overshoot occurs in the associated output signal, it is to be understood that it is impossible to prevent the error from occurring in the count value.
Originally, the purpose of providing two-phase output signals of the optical encoders aims at that the rotational direction (the distinction between CW=clockwise rotation and CCW=counterclockwise rotation) is detected to control the up/down direction of the up/down counter, thereby enabling the angle of the motor capable of rotating in both of the directions CW and CCW to be measured.
For example, if the slits of the phase A and the phase B are formed at the same interval and also the slits of the phase B are shifted in the direction CCW by 90 degrees, then when examining the output signals of the encoders, the rotational direction can be detected in such a way that when the encoders output the signals with the phase A leading the phase B by 90 degrees, the motor rotates in the direction CW, while when the encoders output the signals with the phase A lagging the phase B by 90 degrees, the motor rotates in the direction CCW. Therefore, on the basis thereof, the up/down direction may be controlled.
Such an encoder in which the two-column slits which are 90 degrees out of phase are formed on the disk of the optical encoder is widely used in general.
When neither the chattering nor the overshoot occurs, the rotational angles of both of the directions CW and CCW can be readily detected by the combination of the two-phase optical encoders with the up/down counter.
In this connection, while in principle, the number of columns of slits may be increased, this results in the absolute encoder. Therefore, in order to make the best use of the advantages such as the small size and the low cost, the incremental encoders of two phases or up to three phases at the most having an index added thereto are commercially manufactured in general.
Then, the circuit is desirable in which the first point that the rotational angles of both of the directions CW and CCW can be detected using the signals of the two-phase incremental optical encoders is made compatible with the second point that no error occurs in the count value (the angle data) due to the chattering or the overshoot.
However, while for such a circuit, some methods have been attempted up to the present, the circuit in which the above-mentioned problems can be perfectly solved has not yet been provided.
As one example, the description will hereinbelow be given by taking a circuit which is disclosed in Japanese Patent Application Laid-Open No. Sho 60-55226. This circuit is the circuit wherein a count value is produced on the basis of output signals of two-phase incremental encoders, and is intended to prevent the wrong count operation from occurring due to the chattering.
FIG. 8 is a circuit diagram showing a configuration of the circuit which is disclosed in Japanese Patent Application Laid-Open No. Sho 60-55226. In the figure, leading and trailing signals (designated by reference symbols S3 to S6 in FIG. 9) of signals of phases A and B which have been inputted from two-phase incremental encoders through input terminals IN1 and IN2 are respectively produced by differentiation circuits 25 to 28. These leading and trailing signals S3 to S6 are generated at the change points of the signals of the phases A and B, and are then held by flip-flops 40 to 43 at the rise of a clock pulse (designated by reference symbol S7 in FIG. 9) which is delayed by a predetermined time constant (designated by reference symbol T in FIG. 9) and also their output signals (designated by reference symbols S8 to S11 in FIG. 9) are held until a rise time of the next clock pulse.
Then, on the basis of the states of those output signals S8 to S11, a counter-up signal and a counter-down signal (designated by reference symbols Pu and Pd, respectively, in FIG. 9) are outputted. Therefore, if the pulse width of the chattering is shorter than the pulse width (designated by reference symbol t in FIG. 9) of each of the leading and trailing signals, then the chattering is excluded. In addition, even if the pulse width of the chattering is longer than t, then the states of the signals are held in the flip-flops 40 to 43 with those signals delayed by the delay time T. As a result, at a time point of occurrence of the chattering, the setting conditions of NOR circuits 44 to 51 are not fulfilled so that the chattering is excluded.
However, even in the circuit shown in FIG. 8, there arise the following problems.
(1) When the signals of the phases A and B as shown in FIG. 9 are inputted to the circuit shown in FIG. 8, it is understood that in actual, the count value is different from the encoder position (i.e., the proper information) due to the chattering in the signal of the phase A.
(2) There is the possibility that the circuit shown in FIG. 8 may generate the error of the count value due to the direction conversion of the encoders. That is, when the direction conversion of the encoders occurs in the middle of the operation as shown in FIG. 10, it is understood that the count value is different from the encoder position (i.e., the proper information) due to the direction conversion.
In this connection, for the overshoot (when the encoder signal is overshot instantaneously by 1/4 cycle to be returned to the original state), it can be verified by drawing the timing chart similarly that the wrong information is generated in that circuit.